ELL

Section: User Commands (1)
Updated:
Index Return to Main Contents
 

NAME

ell - recursive descent parser generator  

SYNOPSIS

ell [-options] [file]  

DESCRIPTION

The parser generator Ell processes LL(1) grammars which may contain EBNF constructs and semantic actions. It generates recursive descent parsers. A mechanism for L-attribution (inherited and synthesized attributes evaluable during one preorder traversal) is provided. Syntax errors are handled fully automatic including error reporting from a prototype error module, error recovery, and error repair.

The grammar is either read from the file given as argument or from standard input. The output is written to the files Parser.md and Parser.mi (Modula-2) or Parser.h and Parser.c (C). Errors detected during the analysis of the grammar are reported on standard error.

The generated parser needs a few additional modules:
First, a scanner (Scanner.md/Scanner.c, Scanner.mi/Scanner.h) containing the function GetToken () and the global variable Attribute. A very primitive Scanner can be requested with the option -s.
Second, a main program. Option -p will provide a simple parser driver (ParsDrv.mi/ParsDrv.c).
Third, an error handling module called Errors has to provide the procedures ErrorMessage and ErrorMessageI. A prototype error handler can be requested with the option -e .  

OPTIONS

c
generate C code
d
generate definition part
e
generate prototype error handler
h
provide help information
i
generate implementation part
m
generate Modula-2 code (default)
p
generate parser driver
s
generate (simple) scanner
 

FILES

if output is in Modula-2:

Parser.md      definition file of the produced parser
Parser.mi      implementation file of the produced parser
ParsDrv.mi     implementation file of simple parser driver
Errors.md      definition file of simple error handler 
Errors.mi      implementation file of simple error handler
Scanner.md     definition file of simple scanner 
Scanner.mi     implementation file of simple scanner
Pars.Tab       Contains sets, to be read when parsing starts

if output is in C:

Parser.h       specification of the produced parser
Parser.c       body of the produced parser
ParsDrv.mi     implementation file of simple parser driver
Errors.h       body simple error handler
Errors.c       implementation file of simple error handler
Scanner.h      body simple scanner
Scanner.c      implementation file of simple scanner
 

SEE ALSO

B. Vielsack: "The Parser Generators Lalr and Ell", GMD Forschungsstelle an der Universitaet Karlsruhe, Compiler Generation Report No. 8, 1988

J. Grosch: "Efficient and Comfortable Error Recovery in Recursive Descent Parsers", Structured Programming, 11, 129-140 (1990)


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 00:38:37 GMT, March 30, 2022